// gradientwidget.h
#ifndef GRADIENTWIDGET_H
#define GRADIENTWIDGET_H

#include <QWidget>
#include <QTimer>

class GradientWidget : public QWidget
{
    Q_OBJECT

public:
    explicit GradientWidget(QWidget *parent = nullptr);

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    QTimer *m_timer;
    qreal m_offset; // 控制颜色往返

private slots:
    void updateAnimation();
};

#endif // GRADIENTWIDGET_H
